export const cascaderProps = {
  emitPath: false,
  multiple: true,
  label: "name",
  value: "user_id",
  children: "sub",
};

export const treeToArray = (tree) => {
  let arr = [];
  const expanded = (datas) => {
    if (datas && datas.length > 0) {
      datas.forEach((e) => {
        if (e.organization_type === 2) {
          arr.push(e.user_id);
        }
        expanded(e.sub);
      });
    }
  };
  expanded(tree);
  return arr;
};
export const radioTypeData = [
  { label: "显示所有拥有该菜单/按钮的人员", value: "all" },
  { label: "显示通过角色拥有该菜单/按钮的人员", value: "role_owner" },
  { label: "显示通过账户自定义权限拥有该菜单/按钮的人员", value: "user_owner" },
];